package pacman.objects;

import java.awt.Graphics;

/**
 * This class represents the door object
 * @author Carlos Massera Filho
 */
public final class Door extends Static
{
  private float angle;

  /**
   * Start door as a visible and hitable object
   * @param posX Position X to insert a door
   * @param posY Position Y to insert a door
   */
  public Door(float posX, float posY)
  {
    this.posX = posX;
    this.posY = posY;
    this.visible = true;
    this.passable = false;
  }

  /**
   * Verify if the door is open
   * @return true if door is open and false if not;
   */
  public boolean isDoorOpen()
  {
    return this.passable;
  }

  /**
   * Prints the door in the map
   * @param g
   */
  public void render(Graphics g)
  {
    if (this.passable == false)
      System.out.print("_");
    else
      System.out.print(" ");
  }
}
